package com.mangohouse.dao.core.impl;

import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.stereotype.Repository;

import com.mangohouse.dao.core.ISysUserDao;
import com.mangohouse.model.core.SysUser;
/**
 * 
 * @TODO 用户DAO实现类
 * @author roye
 * @date May 17, 2013 2:52:16 PM
 * @version V1.0
 */
@Repository
public class CSysUserDaoImpl implements ISysUserDao {

	@Autowired
	private SqlSessionTemplate sqlSessionTemplate;

	/**
	 * 登录查询
	 */
	public SysUser getSysUser(String username, String pwd)
			throws DataAccessException {
		SysUser user = new SysUser();
		user.setLoginName(username);
		user.setUserPwd(pwd);
		return sqlSessionTemplate.selectOne("SysUser.queryUserByLogin", user);
	}
}
